package com.woniuxy.microfixeddepositserver.dao;


import com.woniuxy.microfixeddepositserver.bean.RiskGradeBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RiskGradeDao {

    /**
     * 查询所有风险等级信息
     */
    @Select("select fund_grade grade,description gDescription,user_min_level userMinLevel,investor_type investorType from risk_grade where status = 1")
    List<RiskGradeBean> selectAll ();

    //根据等级查询风险等级信息
    @Select("select fund_grade grade,min_score minScore,max_score maxScore ," +
            "description gDescription,user_min_level userMinLevel,investor_type investorType from risk_grade where fund_grade=#{grade} and status = 1")
    RiskGradeBean getInfoById (@Param("grade") String grade);


}